package com.baizhi.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author：请允悲
 * @Slogan：
 * @Package：com.baizhi.controller
 * @Project：springbootjwt
 * @name：TestController
 * @Date：2023/9/19 16:36
 * @Filename：TestController
 */

@RestController
//@RequestMapping("/")
public class TestController {

    @GetMapping("/test/test")
    public String test(String username, HttpServletRequest request){

        //认证成功之后放入session
        request.getSession().setAttribute("username",username);

        return "login ok";
    }
}
